package com.itentbase.match.pojo.po;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;


/**
 * 足球赛事实体类
 *
 * @author wjl
 * @date 2024-12-26 11:47:52
 */
@TableName("football_match")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class FootballMatch implements Serializable {
    private static final long serialVersionUID = -7545903807082666542L;

    @TableId(value = "id", type = IdType.INPUT)
    private Integer id;

    private String matchNumStr; //比赛编号
    private LocalDate startDate; //开始日期
    private LocalDateTime matchDateTime; //比赛时间
    private String leagueAbbName; //联赛简称
    private String leagueAllName; //联赛全称
    private String season; //赛季 例如：2024/2025
    private String roundNum; //轮数 例如：常规赛 第18轮
    private String homeTeamAbbName; //主队简称
    private String homeTeamAllName; //主队全称
    private String awayTeamAbbName; //客队简称
    private String awayTeamAllName; //客队全称
    private Integer homeTeamPreMatchRank; //主队赛前排名
    private Integer awayTeamPreMatchRank; //客队赛前排名
    private Integer giveBall; //让球数
    private Boolean singlePass; //胜平负单关：false非单关，true单关（暂时不做）
    private Boolean singlePass2; //让胜平负单关：false非单关，true单关（暂时不做）
    private Boolean closeWdl; //是否开启胜平负选项，false开启，true未开启
    private String halfScore; //半场分数
    private String fullScore; //全场分数
    private Byte status; //比赛状态：0 未完赛（默认），2 已结束,3无效比赛

    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @TableField(value = "createTime", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @TableField(value = "updateTime", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
